home *** CD-ROM | disk | FTP | other *** search
/ Saar AMOK 2 / Saar AMOK II - Oktober 1994 (1994)(Kreativ Marketing)(DE)[!][I-7598].iso / disks / 651_700 / 667 / dragit / install / install-dragit < prev    next >
Text File  |  1994-01-05  |  25KB  |  907 lines

  1. ;++++++++++++++++++++++++++++++++++++++++++++++++++
  2. ; $VER: Install-DragIt v4.0 (2.11.93)
  3. ; Installation script by Jan and Erik Simonson
  4. ;++++++++++++++++++++++++++++++++++++++++++++++++++
  5.  
  6. (set OSVersion      (/ (getversion) 65536))
  7. (set WBVersion      (/ (getversion "LIBS:version.library" ) 65536))
  8.  
  9. ;++++++++++++++++++++++++++++++
  10. ;Set up variables in English.
  11. ;++++++++++++++++++++++++++++++
  12.  
  13. (set #Language 0)
  14. (set LanguageID 0)
  15. (set DocID 1)
  16.  
  17. (set #LowVersion "Sorry, you need at least OS/WB version 2.0 to use DragIt")
  18.  
  19. (set #SetDirPathPrompt "Please select the directory ")
  20.  
  21. (set #DragItDirPrompt "where you want to install DragIt.")
  22. (set #DragItDirHelp
  23.   (cat "  If you want DragIt to start automatically every time your Amiga "
  24.        "starts you should not change the suggested directory "
  25.        "(SYS:WBStartup).\n  You should choose another directory for DragIt "
  26.        "if you do not wish the program to start automatically.\n"
  27.   )
  28. )
  29. (set #DragDirPrompt "where you want to install Drag.")
  30. (set #DragDirHelp
  31.   (cat "  Normally Drag, which is a preference program, should always be "
  32.        "installed in the suggested directory (SYS:Prefs).\n  If you for "
  33.        "some reason do not want it installed there, please choose another "
  34.        "directory.\n"
  35.   )
  36. )
  37. (set #SelectLanguagePrompt
  38.   (cat "Besides English, select the preferred languages in which you might "
  39.        "want to run the Drag program."
  40.   )
  41. )
  42. (set #SelectLanguageHelp
  43.   (cat "  You should select all the possible languages you want menu and "
  44.        "requester text to be displayed in.\n  At this time, the "
  45.        "alternatives to English are French and Swedish.\n\n"
  46.        "French\n  This should be selected if you want the French versions "
  47.        "of menus and requester text.\n\n"
  48.        "Swedish\n  This should be selected if you want the Swedish versions "
  49.        "of menus and requester text.\n\n"
  50.   )
  51. )
  52. (set #LanguageEnglish "English")
  53. (set #LanguageFrench "French")
  54. (set #LanguageSwedish "Swedish")
  55.  
  56. (set #AskNoviceDoc "\nDo you want to install the documentation?")
  57. (set #AskNoviceDocHelp
  58.   (cat "  Do you want to install DragIt's documentation press the \"Yes\" "
  59.        "button, if not press the \"No\" button."
  60.   )
  61. )
  62.  
  63. (set #SelectDocPrompt
  64.        "Select the languages in which you want to install the documentation.") 
  65. (set #SelectDocHelp
  66.   (cat "  You should select all the languages in which you want the "
  67.        "documentation available on your Amiga.\n  At this time, the "
  68.        "alternatives to English are French and Swedish.\n\n"
  69.        "English\n  This should be selected if you want the English "
  70.        "documentation.\n\n"
  71.        "French\n  This should be selected if you want the French "
  72.        "documentation.\n\n"
  73.        "Swedish\n  This should be selected if you want the Swedish "
  74.        "documentation.\n\n"
  75.   )
  76. )
  77.  
  78. (set #DocDirPrompt "where you want to install the documentation.")
  79. (set #DocDirHelp
  80.   (cat "  Install the documentation in a directory where it can be easely "
  81.        "reached and preferably together with the documentation for other "
  82.        "commodities.\n\n"
  83.   )
  84. )
  85.  
  86. (set #Proceed1 "You have choosen to install DragIt in the\n")
  87. (set #Proceed2 " directory.\n\nYou have also choosen to install Drag in the\n")
  88. (set #Proceed3 " directory.\n\n\Further the selected programlanguages are\n")
  89. (set #Proceed4 "\nand documentation in ")
  90. (set #Proceed5 "and no documentation will be installed.")
  91. (set #Proceed6 "will be installed in ")
  92. (set #Proceed7 "\n\nShall I proceed with the installation?")
  93. (set #ProceedHelp
  94.   (cat "  Once you press the \"Proceed\" button, the selected items will be "
  95.        "installed. This is your last chance to abort this procedure without "
  96.        "partially installing the selected files.\n\n  After you press "
  97.        "Proceed, you can use the Esc key to abort the installation "
  98.        "procedure."
  99.   )
  100. )
  101.  
  102. (set #InstallPrompt "Installing")
  103.  
  104. (set #NoLocaleMessage
  105.   (cat "\nYou do not seem to have LOCALE: assigned to the directory where "
  106.        "the localization files are stored.\nPlease install the system "
  107.        "software localization files before retrying this installation.\n\n"
  108.        "Press either the \"Proceed\" or \"Abort Install\" button to abort "
  109.        "this installation."
  110.   )
  111. )
  112. (set #NoLocaleCatalogMessage
  113.   (cat "\nThere is no  LOCALE:Catalogs  directory. This installation "
  114.        "requires that directory to be present to install the selected "
  115.        "locale support files.\n\nPress either the \"Proceed\" or \"Abort "
  116.        "Install\" button to abort this installation."
  117.   )
  118. )
  119. (set #CopyLanguage "catalog files...")
  120. (set #CopyDoc "AmigaGuide file...")
  121.  
  122. (set #ReadDoc "\nDo you want to read the documentation?")
  123.  
  124. (set #ReadDocHelp
  125.   (cat "  If you want to read the documentation for DragIt press the \"Yes\" "
  126.        "button, if you don't want to read it, press the \"No\" button.\n"
  127.   )
  128. )
  129.  
  130. (set #DocIDPrompt "Which documentation do you want to read?")
  131.  
  132. (set #DocIDHelp
  133.   (cat "  Choose the documentation which you now want to read, as a reference "
  134.        "when you configurate DragIt.\n"
  135.   )
  136. )
  137.  
  138. (set #RunDragIt "\nDo you want to run DragIt?")
  139.  
  140. (set #RunDragItHelp
  141.   (cat "  If you press the \"Yes\" button, DragIt will be executed so you "
  142.        "can take advantage of the program whithout resetting the computer."
  143.   )
  144. )
  145.  
  146. (set #RunDrag 
  147.        "\nDragIt is now running, do you want to run the preference program?")
  148.  
  149. (set #RunDragHelp
  150.   (cat "  If you press the \"Yes\" button the preference program will be "
  151.        "executed so that you can configurate DragIt to your own liking, and "
  152.        "then, if you want to, save the configurations."
  153.   )
  154. )
  155.  
  156. ;++++++++++++++++++++++++++++++
  157. ; Set up variables in French.
  158. ;++++++++++++++++++++++++++++++
  159.  
  160. (if (= @language "français")
  161. (
  162. (set #Language 1)
  163. (set LanguageID 1)
  164. (set DocID 2)
  165.  
  166. (set #LowVersion "Désolé, vous devez avoir au minimum l'OS/WB 2.0 pour faire fonctionner DragIt")
  167.  
  168. (set #SetDirPathPrompt "Choisir le répertoire où vous ")
  169.  
  170. (set #DragItDirPrompt "voulez installer DragIt.")
  171. (set #DragItDirHelp
  172.   (cat "  Si vous voulez que DragIt soit démarer automatiquement au boot de "
  173.        "l'Amiga, ne changer pas le répertoire suggéré suivant "
  174.        "(SYS:WBStartup).\n  Vous devez choisir une autre répertoire que si "
  175.        "vous ne voulez pas le départ automatique du programme.\n"
  176.   )
  177. )
  178. (set #DragDirPrompt "voulez installer le programme Drag.")
  179. (set #DragDirHelp
  180.   (cat "  Normalement le programme de préférence Drag doit être copié dans "
  181.        "le répertoire suggéré suivant (SYS:Prefs).\n  Si vous voulez pour "
  182.        "pour certaines raisons qu'il soit installé ailleur, choisisser un "
  183.        "autre répertoire.\n"
  184.   )
  185. )
  186. (set #SelectLanguagePrompt
  187.   (cat "Autre qu'anglais, choisisser les languages préférées pour l'utilisation "
  188.        "du préférence Drag."
  189.   )
  190. )
  191. (set #SelectLanguageHelp
  192.   (cat "  Vous devez choisir toutes les langues qui seront utilisées dans "
  193.        "les menus et fenêtres du programme.\n  Présentement, les alternatives à "
  194.        "l'anglais sont français et suédois.\n\n"
  195.        "Français\n  A sélectionner si vous voulez la version française des "
  196.        "menus et des textes.\n\n"
  197.        "Suédois\n  A sélectionner si vous voulez la version suédoise des "
  198.        "menus et des textes.\n\n"
  199.   )
  200. )
  201. (set #LanguageEnglish "Anglais")
  202. (set #LanguageFrench "Français")
  203. (set #LanguageSwedish "Suédois")
  204.  
  205. (set #AskNoviceDoc "\nVoulez-vous installer la documentation?")
  206. (set #AskNoviceDocHelp
  207.   (cat "  Si vous voulez installer la documentation de DragIt appuyer sur le bouton \"Oui\" "
  208.        ", sinon appuyer sur le bouton \"Non\"."
  209.   )
  210. )
  211.  
  212. (set #SelectDocPrompt
  213.        "Sélectionner les langues de la documentation à installer.") 
  214. (set #SelectDocHelp
  215.   (cat "  Vous devez choisir toutes les langues qui seront installées pour "
  216.        "la documentation du programme.\n  Présentement, les alternatives à "
  217.        "l'anglais sont français et suédois.\n\n"
  218.        "Anglais\n  A sélectionner si vous voulez la version anglaise des "
  219.        "menus et des textes.\n\n"
  220.        "Français\n  A sélectionner si vous voulez la version française des "
  221.        "menus et des textes.\n\n"
  222.        "Suédois\n  A sélectionner si vous voulez la version suédoise des "
  223.        "menus et des textes.\n\n"
  224.   )
  225. )
  226.  
  227. (set #DocDirPrompt "voulez installer la documentation.")
  228. (set #DocDirHelp
  229.   (cat "  Installer la documentation dans un répertoire facile d'accès "
  230.        "préférablement au même endroit que la documentation des autres applications "
  231.        "du système.\n\n"
  232.   )
  233. )
  234.  
  235. (set #Proceed1 "Vous avez choisi d'installer DragIt dans le répertoire ")
  236. (set #Proceed2 ".\n\nVous avez aussi choisi d'installer le préférence Drag dans le répertoire ")
  237. (set #Proceed3 ".\n\n\Les langues sélectionnées sont\n")
  238. (set #Proceed4 "\net la documentation ")
  239. (set #Proceed5 "\nsans documentation ")
  240. (set #Proceed6 "sera installée dans ")
  241. (set #Proceed7 "\n\nDois-je procéder à l'installation?")
  242. (set #ProceedHelp
  243.   (cat "  Un fois que vous aurez appuyé sur le bouton \"Proceed\", les items "
  244.        "sélectionnés seront installés. Ceci est la dernière chance d'annuler "
  245.        "l'opération sans installer les fichiers.\n\n Après avoir appuyé sur "
  246.        "Proceed il sera toujours possible d'arrêter l'installation en appuyant "
  247.        "sur la touche Esc."
  248.   )
  249. )
  250.  
  251. (set #InstallPrompt "Installation")
  252.  
  253. (set #NoLocaleMessage
  254.   (cat "\nVous ne semblez pas avoir de répertoire LOCALE: où sont situé les fichiers "
  255.        "de traduction.\nVeulliez installer les fichiers nécessaires à la "
  256.        "localisation avant de continuer.\n\nAppuyer sur \"Proceed\" ou sur "
  257.        "\"Abort\" annulera l'installation."
  258.   )
  259. )
  260. (set #NoLocaleCatalogMessage
  261.   (cat "\nVous ne semblez pas avoir de répertoire LOCALE:Catalogs. Cette "
  262.        "installation requier qu'il soit présent pour installer correctement "
  263.        "les fichiers de traduction.\n\nAppuyer sur \"Proceed\" ou sur "
  264.        "\"Abort\" annulera l'installation."
  265.   )
  266. )
  267. (set #CopyLanguage "Fichiers catalog...")
  268. (set #CopyDoc "Fichiers AmigaGuide...")
  269.  
  270. (set #ReadDoc "\nVoulez-vous lire la documentation?")
  271.  
  272. (set #ReadDocHelp
  273.   (cat "  Si vous voulez lire la documentation de DragIt appuyer sur le bouton \"Oui\" "
  274.        ", sinon appuyez sur le bouton \"Non\"."
  275.   )
  276. )
  277.  
  278. (set #DocIDPrompt "Quelle documentation voulez-vous lire?")
  279.  
  280. (set #DocIDHelp
  281.   (cat "  Choisisser la documentation à lire, ceci vous aidera à configurer "
  282.        "DragIt dès maintenant.\n"
  283.   )
  284. )
  285.  
  286. (set #RunDragIt "\nVoulez-vous exécuter DragIt maintenant?")
  287.  
  288. (set #RunDragItHelp
  289.   (cat "  Si vous appuyer sur le bouton \"Oui\", DragIt sera exécuté maintenant sans "
  290.        "avoir à redémarer l'ordinateur."
  291.   )
  292. )
  293.  
  294. (set #RunDrag 
  295.        "\nDragIt est maintenant fonctionnel, voulez-vous exécuter le programme de préférence?")
  296.  
  297. (set #RunDragHelp
  298.   (cat "  Si vous appuyer sur le bouton \"Oui\" le préférence sera exécuté "
  299.        "vous permettant de configurer dès maintenant DragIt comme vous "
  300.        "l'aimez. Vous pourrez aussi sauver la configuration."
  301.   )
  302. )
  303. )
  304. )
  305.  
  306.  
  307. ;++++++++++++++++++++++++++++++
  308. ; Set up variables in Swedish.
  309. ;++++++++++++++++++++++++++++++
  310.  
  311. (if (= @language "svenska")
  312. (
  313. (set #Language 3)
  314. (set LanguageID 4)
  315. (set DocID 8)
  316.  
  317. (set #LowVersion
  318.   "Tyvärr, du måste ha minst OS/WB version 2.0 för att kunna använda DragIt")
  319.  
  320. (set #SetDirPathPrompt "Välj den katalog ")
  321.  
  322. (set #DragItDirPrompt "där du vill installera DragIt.")
  323. (set #DragItDirHelp
  324.   (cat "  Om du vill att Dragit skall starta automatiskt vid varje start av "
  325.        "din Amiga skall du inte ändra den föreslagna katalogen "
  326.        "(SYS:WBStartup).\n  Vill du inte att DragIt skall starta automatiskt "
  327.        "skall du välja en annan katalog för programmet.\n"
  328.   )
  329. )
  330. (set #DragDirPrompt "där du vill installera Drag.")
  331. (set #DragDirHelp
  332.   (cat "  Normalt skall Drag, som är ett inställningsprogram, alltid "
  333.        "installeras i den föreslagna katalogen (SYS:Prefs).\n  Om du av "
  334.        "någon anledning inte vill detta, välj en annan katalog.\n"
  335.   )
  336. )
  337. (set #SelectLanguagePrompt
  338.   (cat "Förutom engelska, välj de språk i vilka du vill ha möjliget att "
  339.        "kunna köra Dragprogrammet."
  340.   )
  341. )
  342. (set #SelectLanguageHelp
  343.   (cat "  Du skall välja alla de språk som du vill ha möjlighet att få "
  344.        "menyer och väljartext i.\n  Just nu är alternativen till engelskan "
  345.        "endast franska och svenska.\n\n"
  346.        "Franska\n  Välj denna om du vill ha den franska versionen av menyer "
  347.        "och väljartext.\n\n"
  348.        "Svenska\n  Välj denna om du vill ha den svenska versionen av menyer "
  349.        "och väljartext.\n\n"
  350.   )
  351. )
  352. (set #LanguageEnglish "Engelska")
  353. (set #LanguageFrench "Franska")
  354. (set #LanguageSwedish "Svenska")
  355.  
  356. (set #AskNoviceDoc "\nVill du installera dokumentationen?")
  357. (set #AskNoviceDocHelp
  358.   (cat "  Vill du installera dokumentationen till DragIt så ska du klicka på "
  359.        "\"Ja\" knappen, vill du inte detta tryck på \"Nej\" knappen."
  360.   )
  361. )
  362.  
  363. (set #SelectDocPrompt
  364.        "Välj de språk i vilka du vill installera dokumentationen.") 
  365. (set #SelectDocHelp
  366.   (cat "  Du skall välja alla de språk som du vill ha dokumentationen "
  367.        "tillgänglig i.\n  Just nu är alternativen till engelskan endast "
  368.        "franska och svenska.\n\n"
  369.        "Engelska\n  Välj denna om du vill ha den engelska "
  370.        "dokumentationen.\n\n"
  371.        "Franska\n  Välj denna om du vill ha den franska dokumentationen.\n\n"
  372.        "Svenska\n  Välj denna om du vill ha den svenska dokumentationen.\n\n"
  373.   )
  374. )       
  375.  
  376. (set #DocDirPrompt "där du vill installera dokumentationen.")
  377. (set #DocDirHelp
  378.   (cat "  Installera dokumentationen i en  katalog där du kan nå den lätt "
  379.        "och helst också tillsammans med dokumentationen för de övriga "
  380.        "commodities programmen.\n\n"
  381.   )
  382. )
  383.  
  384. (set #Proceed1 "Du har valt att installera DragIt i\n")
  385. (set #Proceed2 " katalogen.\n\nDu har också valt att installera Drag i\n")
  386. (set #Proceed3 " katalogen.\n\nVidare är de valda programspråken\n")
  387. (set #Proceed4 "\noch dokumentation på ")
  388. (set #Proceed5 "och ingen dokumentation kommer att installeras.")
  389. (set #Proceed6 "kommer att installeras i ")
  390. (set #Proceed7 "\n\nSkall jag fullfölja installationen?")
  391. (set #ProceedHelp
  392.   (cat "  När du klickar på \"Fortsätt\" knappen, kommer de valda "
  393.        "programdelarna att installeras. Det här är din sista chans att "
  394.        "avbryta installationen utan att delvis installera de valda "
  395.        "programdelarna.\n\n  När du har klickat på \"Fortsätt\" knappen, "
  396.        "kan du avbryta installationen genom att trycka på \"Esc\" tangenten."
  397.   )
  398. )
  399.  
  400. (set #InstallPrompt "Installerar")
  401.  
  402. (set #NoLocaleMessage
  403.   (cat "\nDu verkar inte ha LOCALE: katalogen där lokalisationsfilerna finns "
  404.        "lagrade assignad.\nInstallera systemmjukvarans lokalisationsfiler "
  405.        "innan du försöker med den här installationen igen.\n\nTryck antingen "
  406.        "på \"Fortsätt\" eller \"Avbryt Installation\" knappen för att "
  407.        "avbryta den här installationen."
  408.   )
  409. )
  410. (set #NoLocaleCatalogMessage
  411.   (cat "\nKatalogen LOCALE:Catalogs finns inte. Installationen kräver att "
  412.        "denna existerar för att de valda språken skall kunna installeras.\n\n"
  413.        "Tryck antingen på \"Fortsätt\" eller \"Avbryt Installation\" "
  414.        "knappen för att avbryta den här installationen."
  415.   )
  416. )
  417. (set #CopyLanguage "katalogfilen...")
  418. (set #CopyDoc "AmigaGuidefilen...")
  419.  
  420. (set #ReadDoc "\nVill du läsa dokumentationen?")
  421.  
  422. (set #ReadDocHelp
  423.   (cat "  Om du vill läsa dokumentationen till DragIt ska du klicka på "
  424.        "\"Ja\" knappen, om du inte vill läsa den klicka på \"Nej\" knappen.\n"
  425.   )
  426. )
  427.  
  428. (set #DocIDPrompt "Vilken dokumentation vill du läsa?")
  429.  
  430. (set #DocIDHelp
  431.   (cat "  Välj den dokumentation till DragIt som du vill läsa, för att sedan "
  432.        "kunna ställa in programmet.\n"
  433.   )
  434. )
  435.  
  436. (set #RunDragIt "\nVill du köra DragIt?")
  437.  
  438. (set #RunDragItHelp
  439.   (cat "  Om du trycker på \"Ja\" knappen kommer DragIt att startas så du kan "
  440.        "dra nytta av programmet utan att starta om datorn."
  441.   )
  442. )
  443.  
  444. (set #RunDrag "\nDragIt går nu, vill du köra inställningsprogrammet?")
  445.  
  446. (set #RunDragHelp
  447.   (cat "  Om du nu trycker på \"Ja\" knappen kommer inställningsprogrammet "
  448.        "att startas så att du kan ställa in DragIt enligt dina egna "
  449.        "önskemål, för att sedan om du vill, kunna spara inställningarna."
  450.   )
  451. )
  452. )
  453. )
  454.  
  455.  
  456. (procedure SetDirPath
  457. ;
  458. ; Ask the user for a directory name.
  459. ; Variables:
  460. ;    #SetDirPathWhy
  461. ;    #SetDirPathHelp
  462. ;    #DirPath
  463.   (
  464.   (set Done FALSE)
  465.   (while (NOT Done)
  466.     (
  467.     (set #DirPath
  468.       (askdir
  469.         (prompt #SetDirPathPrompt #SetDirPathWhy)
  470.         (help ("%s\n" #SetDirPathHelp) @askdir-help)
  471.         (default #DirPath)
  472.       )
  473.     )
  474.  
  475.     (if (= (exists #DirPath) 0)
  476.       (makedir #DirPath)
  477.       (set Done TRUE)
  478.     )
  479.     )
  480.   )
  481.   )
  482. )
  483.  
  484. (procedure IncrementMeter
  485. ;
  486. ; Variables:
  487. ;    #TotalFiles
  488. ;    #AddToMeter
  489. ;
  490.   (
  491.   (set #DoneFiles (+ #DoneFiles #AddToMeter))
  492.   (complete (/ (* #DoneFiles 100) #TotalFiles))
  493.   )
  494. )
  495.  
  496. ;++++++++++++++++++++++++++++
  497. ; The Installer script starts here. 
  498. ;++++++++++++++++++++++++++++
  499.  
  500. (if (OR (< OSVersion 37) (< WBVersion 37))
  501.   (abort #LowVersion)
  502. )
  503. (set #TotalFiles 0)
  504. (set #DoneFiles 0)
  505. (set @default-dest "")
  506. (set #user-level @user-level)
  507.  
  508. ;++++++++++++++++++++++++++++++
  509. ; Ask for DragIt destination directory.
  510. ;++++++++++++++++++++++++++++++
  511.  
  512. (set #SetDirPathWhy #DragItDirPrompt)
  513. (set #SetDirPathHelp #DragItDirHelp)
  514. (set #DirPath "SYS:WBStartup")
  515. (SetDirPath)
  516. (set #DragItPath #DirPath)
  517. (set #TotalFiles (+ #TotalFiles 2))
  518.  
  519. ;++++++++++++++++++++++++++++++
  520. ; Ask for Drag destination directory.
  521. ;++++++++++++++++++++++++++++++
  522.  
  523. (set #SetDirPathWhy #DragDirPrompt)
  524. (set #SetDirPathHelp #DragDirHelp)
  525. (set #DirPath "SYS:Prefs")
  526. (SetDirPath)
  527. (set #DragPath #DirPath)
  528. (set #TotalFiles (+ #TotalFiles 2))
  529.  
  530. ;++++++++++++++++++++++++++++++
  531. ; Ask for languages to install.
  532. ;++++++++++++++++++++++++++++++
  533.  
  534. (if (AND (> OSVersion 37) (> WBVersion 37))
  535.   (
  536.   (set LanguageID
  537.     (askoptions
  538.       (prompt #SelectLanguagePrompt)
  539.       (help #SelectLanguageHelp @askoptions-help)
  540.       (choices
  541.         #LanguageFrench
  542.         #LanguageSwedish
  543.       )
  544.       (default LanguageID)
  545.     )
  546.   )
  547.   )
  548.   (set LanguageID 0)
  549. )
  550. (if (<> LanguageID 0)
  551.   (
  552.     (set Language 0)
  553.     (set MaxLanguage 2)
  554.     (while (< Language MaxLanguage)
  555.       (
  556.       (if (IN LanguageID Language)
  557.         (set #TotalFiles (+ #TotalFiles 1))
  558.       )
  559.       (set Language (+ Language 1))
  560.       )
  561.     )
  562.   )
  563. )
  564.  
  565.  
  566. ;++++++++++++++++++++++++++++++
  567. ; Ask which documentation to install.
  568. ;++++++++++++++++++++++++++++++
  569.  
  570. (if (= @user-level 0)
  571.   (
  572.     (user 2)
  573.     (if (= 0
  574.           (askbool
  575.             (prompt #AskNoviceDoc)
  576.             (help #AskNoviceDocHelp)
  577.             (default 1)
  578.           )
  579.         )
  580.       (
  581.       (set #TotalFiles (+ #TotalFiles 2))
  582.       (set DocID 0)
  583.       )
  584.     )
  585.     (user #user-level)
  586.   )
  587.   (
  588.   (set DocID
  589.     (askoptions
  590.       (prompt #SelectDocPrompt)
  591.       (help #SelectDocHelp @askoptions-help)
  592.       (choices
  593.         #LanguageEnglish
  594.         #LanguageFrench
  595.         #LanguageSwedish
  596.       )
  597.       (default DocID)
  598.     )
  599.   )
  600.   (if (<> DocID 0)
  601.     (
  602.       (set Doc 0)
  603.       (set MaxDoc 3)
  604.       (while (< Doc MaxDoc)
  605.         (
  606.         (if (IN DocID Doc)
  607.           (set #TotalFiles (+ #TotalFiles 2))
  608.         )
  609.         (set Doc (+ Doc 1))
  610.         )
  611.       )
  612.     )
  613.   )
  614.   )
  615. )
  616.  
  617. ;++++++++++++++++++++++++++++++
  618. ; Ask for documentation destination directory.
  619. ;++++++++++++++++++++++++++++++
  620.  
  621. (if (<> DocID 0)
  622.   (
  623.     (user 2)
  624.     (set #SetDirPathWhy #DocDirPrompt)
  625.     (set #SetDirPathHelp #DocDirHelp)
  626.     (set #DirPath "RAM:")
  627.     (SetDirPath)
  628.     (set #DocPath #DirPath)
  629.     (user #user-level)
  630.   )
  631. )
  632.  
  633. ;++++++++++++++++++++++++++++++
  634. ; Ask if proceed with installation.
  635. ;++++++++++++++++++++++++++++++
  636.  
  637. (complete 0)
  638. (set #LocalLanguage (cat #LanguageEnglish " "))
  639. (set LocalLanguage 0)
  640. (set MaxLocal 2)
  641. (while (< LocalLanguage MaxLocal)
  642. (
  643.   (set #LocalLang
  644.     (select LocalLanguage
  645.       #LanguageFrench
  646.       #LanguageSwedish
  647.       ""
  648.     )
  649.   )
  650.   (if (IN LanguageID LocalLanguage)
  651.     (set #LocalLanguage (cat #LocalLanguage #LocalLang " "))
  652.   )
  653.   (set LocalLanguage (+ LocalLanguage 1))
  654. )
  655. )
  656.  
  657. (set #DocLanguage "")
  658. (set DocLanguage 0)
  659. (set MaxDoc 3)
  660. (while (< DocLanguage MaxDoc)
  661. (
  662.   (set #DocLang
  663.     (select DocLanguage
  664.       #LanguageEnglish
  665.       #LanguageFrench
  666.       #LanguageSwedish
  667.       ""
  668.     )
  669.   )
  670.   (if (IN DocID DocLanguage)
  671.     (set #DocLanguage (cat #DocLanguage #DocLang " "))
  672.   )
  673.   (set DocLanguage (+ DocLanguage 1))
  674. )
  675. )
  676.  
  677. (if (<> DocID 0)
  678.   (message  #Proceed1 #DragItPath #Proceed2 #DragPath #Proceed3 #LocalLanguage
  679.             #Proceed4 #DocLanguage #Proceed6 #DocPath #Proceed7
  680.    (help #ProceedHelp)
  681.   )
  682.   (message  #Proceed1 #DragItPath #Proceed2 #DragPath #Proceed3 #LocalLanguage
  683.             #Proceed5 #Proceed7
  684.    (help #ProceedHelp)
  685.   )
  686. )
  687.  
  688. ;++++++++++++++++++++++++++++++
  689. ; Install the DragIt program and Icon.
  690. ;++++++++++++++++++++++++++++++
  691.  
  692. (copyfiles
  693.     (prompt ("%s DragIt..." #InstallPrompt))
  694.     (help @copyfiles-help)
  695.     (source "/WBStartUp/DragIt")
  696.     (dest #DragItPath)
  697.     (confirm)
  698. )
  699. (if (exists (tackon #DragItPath "DragIt") (noreq))
  700.   (copyfiles
  701.     (source "/WBStartUp/DragIt.info")
  702.     (dest #DragItPath)
  703.   )
  704. )
  705. (set #AddToMeter 2)
  706. (IncrementMeter)
  707.  
  708. ;++++++++++++++++++++++++++++++
  709. ; Install the Drag program and Icon.
  710. ;++++++++++++++++++++++++++++++
  711.  
  712. (copyfiles
  713.     (prompt ("%s Drag..." #InstallPrompt))
  714.     (help @copyfiles-help)
  715.     (source "/Prefs/Drag")
  716.     (dest #DragPath)
  717.     (confirm)
  718. )
  719. (if (exists (tackon #DragPath "Drag") (noreq))
  720.   (copyfiles
  721.     (source "/Prefs/Drag.info")
  722.     (dest #DragPath)
  723.   )
  724. )
  725. (set #AddToMeter 2)
  726. (IncrementMeter)
  727.  
  728. ;++++++++++++++++++++++++++++++
  729. ; Install selected languages.
  730. ;++++++++++++++++++++++++++++++
  731.  
  732. (if (<> LanguageID 0)
  733. (
  734.   (if (= (getassign "LOCALE" "a") "")
  735.   (
  736.     (message #NoLocaleMessage)
  737.   )
  738.   (
  739.     (if (<> (exists "LOCALE:Catalogs") 2)
  740.     (message #NoLocaleCatalogMessage)
  741.     (
  742.       (set Language 0)
  743.       (set MaxLanguage 2)
  744.       (while (< Language MaxLanguage)
  745.       (
  746.         (if (IN LanguageID Language)
  747.         (
  748.           (set #LanguageName
  749.             (select Language
  750.               #LanguageFrench
  751.               #LanguageSwedish
  752.               ""
  753.             )
  754.           )
  755.           (set LanguageName
  756.             (select Language
  757.               "français"
  758.               "svenska"
  759.               ""
  760.             )
  761.           )
  762.           (copyfiles
  763.             (prompt ("%s %s %s" #InstallPrompt #LanguageName #CopyLanguage))
  764.             (help @copyfiles-help)
  765.             (source ("/Catalogs/%s" LanguageName))
  766.             (dest ("LOCALE:Catalogs/%s" LanguageName))
  767.             (all)
  768.             (confirm)
  769.           )
  770.           (set #AddToMeter 1)
  771.           (IncrementMeter)
  772.         )
  773.         )
  774.         (set Language (+ Language 1))
  775.       )
  776.       )
  777.     )
  778.     )
  779.   )
  780.   )
  781. )
  782. )
  783.  
  784. ;++++++++++++++++++++++++++++++
  785. ; Install selected documentation.
  786. ;++++++++++++++++++++++++++++++
  787.  
  788. (set Doc 0)
  789. (set MaxDoc 3)
  790. (set DocIn 0)
  791. (while (< Doc MaxDoc)
  792. (
  793.   (if (IN DocID Doc)
  794.   (
  795.     (set #DocName
  796.       (select Doc
  797.         #LanguageEnglish
  798.         #LanguageFrench
  799.         #LanguageSwedish
  800.         ""
  801.       )
  802.     )
  803.     (set DocName
  804.       (select Doc
  805.         "DragIt.guide"
  806.         "DragIt.guide.français"
  807.         "DragIt.guide.svenska"
  808.         ""
  809.       )
  810.     )
  811.     (copyfiles
  812.       (prompt ("%s %s %s" #InstallPrompt #DocName #CopyDoc))
  813.       (help @copyfiles-help)
  814.       (source ("/Documentation/%s" DocName))
  815.       (dest #DocPath)
  816.       (confirm)
  817.     )
  818.     (if (exists (tackon #DocPath DocName) (noreq))
  819.     (
  820.       (copyfiles
  821.         (source ("/Documentation/%s.info" DocName))
  822.         (dest #DocPath)
  823.       )
  824.       (if (< WBVersion 38)
  825.         (tooltype
  826.           (dest (tackon #DocPath DocName))
  827.           (setdefaulttool "SYS:Utilities/More")
  828.         )
  829.       )
  830.     )
  831.     )
  832.     (set DocIn (+ DocIn 1))
  833.     (set #AddToMeter 2)
  834.     (IncrementMeter)
  835.   )
  836.   )
  837.   (set Doc (+ Doc 1))
  838. )
  839. )
  840.  
  841. ;++++++++++++++++++++++++++++++
  842. ; Ask and read documentation.
  843. ;++++++++++++++++++++++++++++++
  844.  
  845. (user 2)
  846. (if (askbool
  847.       (prompt #ReadDoc)
  848.       (help #ReadDocHelp)
  849.       (default 1)
  850.     )
  851.   (
  852.     (user #user-level)
  853.     (if (<> DocIn 1)
  854.       (set DocName
  855.         (select (askchoice
  856.                   (prompt #DocIDPrompt)
  857.                   (help #DocIDHelp @askchoice-help)
  858.                   (choices
  859.                     #LanguageEnglish
  860.                     #LanguageFrench
  861.                     #LanguageSwedish
  862.                   )
  863.                   (default #Language)
  864.                 )
  865.           "DragIt.guide"
  866.           "DragIt.guide.français"
  867.           "DragIt.guide.svenska"
  868.         )
  869.       )
  870.     )
  871.     (if (> WBVersion 37)
  872.       (run ("Run SYS:Utilities/MultiView /Documentation/%s" DocName))
  873.       (run ("Run SYS:Utilities/More /Documentation/%s" DocName))
  874.     )
  875.   )
  876. )
  877.  
  878. ;++++++++++++++++++++++++++++++
  879. ; Ask and run DragIt and Drag.
  880. ;++++++++++++++++++++++++++++++
  881.  
  882. (user 2)
  883. (if (askbool
  884.       (prompt #RunDragIt)
  885.       (help #RunDragItHelp)
  886.       (default 1)
  887.     )
  888.   (
  889.     (user #user-level)
  890.     (run ("Run /WBStartUp/DragIt"))
  891.     (if (askbool
  892.           (prompt #RunDrag)
  893.           (help #RunDragHelp)
  894.           (default 0)
  895.         )
  896.       (
  897.         (set #RunDragPath (tackon #DragPath "Drag"))
  898.         (run ("Run %s" #RunDragPath))
  899.       )
  900.     )
  901.   )
  902. )
  903.  
  904. ;++++++++++++++++++++++++++++++
  905. ; End of installation script
  906. ;++++++++++++++++++++++++++++++
  907.